<div class="personas form">
<?php echo $this->Form->create('Persona');?>

<?php if(!isset($tipo)){
	$tipo = "";

	}
?>
	<fieldset>

	<legend><?php __('Editar Persona ' ); if($tipo) echo uc($tipo); ?></legend>

	<?php
		echo $this->Form->input('nombres');
		echo $this->Form->input('apellidos');
		echo $this->Form->input('cedula');
		echo $this->Form->input('rif');


		if ($tipo === 'contratados')
		{
			if($persona === 'juridica'){
				echo $this->Form->input('Razon social');
				echo $this->Form->hidden('sw_tipo', array('value' => '2'));
			}
			else
			{
				echo $this->Form->hidden('sw_tipo', array('value' => '1'));
			}

		}

			if ($tipo === 'asociados'){
				echo $this->Form->input('nro_cert', array ('label'=>'Nro. de Certificado de Aportacion:'));
				echo $this->Form->hidden('sw_tipo', array('value' => '3'));
			}

			if ($tipo === 'alianza'){
				echo $this->Form->input('nro_cert', array ('label'=>'Nro. de Certificado de Aportacion:'));
				echo $this->Form->hidden('sw_tipo', array('value' => '3'));
				echo $this->Form->input('cooperativa');
			}



		echo $this->Form->input('telefono', array ('label' => 'Telefono Ofic:' ));
		echo $this->Form->input('telefono_movil');

		echo $this->Form->input('correo');
		echo $this->Form->input('correo2', array ('label' => 'Correo Alternativo' ));
		echo $this->Form->input('correo3', array ('label' => 'Correo Alternativo' ));

		echo $this->Form->input('fl_ingreso', array('readonly' => 'readonly'));

		echo $this->Ajax->datepicker('PersonaFlIngreso', array(
																'dateFormat' => 'dd/mm/yy',
																'changeYear' => true,
																'changeMonth' => true,
																));

		echo $this->Form->input('fl_egreso', array('readonly' => 'readonly'));

		echo $this->Ajax->datepicker('PersonaFlEgreso', array(
																'dateFormat' => 'dd/mm/yy',
																'changeYear' => true,
																'changeMonth' => true,
																));

		echo $this->Form->input('fecha_nacimiento', array('readonly' => 'readonly'));

		echo $this->Ajax->datepicker('PersonaFechaNacimiento', array(
																'dateFormat' => 'dd/mm/yy',
																'changeYear' => true,
																'changeMonth' => true,
																));


		//echo $this->Form->input('razon_social');
		//echo $this->Form->input('sw_activo');
		//echo $this->Form->input('salario');


		//echo $this->Form->input('sw_tipo');

		//echo $this->Form->input('nro_cert');
	?>
	</fieldset>

	<?php echo $this->Form->submit(__('Editar', true), array('div'=>false, 'name'=>'submit'));?>
<?php echo $this->Form->submit('Cancelar', array('div'=>false, 'name'=>'cancelar')); ?>
<?php echo $this->Form->end();?>

<br>
</div>
<div class="actions">
	<h3><?php __('Acciones'); ?></h3>
	<ul>

		<li><?php echo $this->Html->link(__('Borrar', true), array('action' => 'delete', $this->Form->value('Persona.id')), null, sprintf(__('Esta seguro de borrar a %s?', true), $this->Form->value('Persona.id'))); ?></li>
		<li><?php echo $this->Html->link(__('Lista de Personas', true), array('action' => 'index'));?></li>
		<li><?php echo $this->Html->link(__('Lista de Usuarios', true), array('controller' => 'usuarios', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Agregar Usuario', true), array('controller' => 'usuarios', 'action' => 'add')); ?> </li>
	</ul>
</div>